package com.c4p.config;

import com.c4p.im.session.*;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.core.RedisTemplate;

@Configuration
public class StoreConfig {

    @Bean
    public ISessionStore sessionStore() {
        return new MemorySessionStore();
    }

    @Bean
    public IUserChannelStore userChannelStore() {
        return new MemoryUserChannelStore();
    }


    @Bean
    public IUserNetStore userNetStore(RedisTemplate redisTemplate){
        return new RedisUserNetStore(redisTemplate);
    }
}
